<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<link href="admin/thame/images/style.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<style>
html,body{
	overflow:hidden;
	background:#FBFBFB;
}
.bs-left-container{
	width:120px;
}
.bs-main-container{
	margin-left:120px;
	overflow:auto;
}

</style>
<!--{template common/header_simple_end}-->

<div class="bs-container clearfix">
  <div class="bs-left-container  clearfix">
   <!--{template left}-->
  </div>
  <div class="left-drager">
     <div class="left-drager-op"><div class="left-drager-sub"></div></div>
  </div>
      
  <div class="bs-main-container  clearfix" > 

  <!--{if !$operation}-->
  <div class="main-header clearfix">
    <ul class="nav nav-pills nav-pills-bottomguide" >
      <li <!--{if !$do}--> class="active"<!--{/if}-->><a href="{ADMINSCRIPT}?mod=$mod">全部主题</a></li>
      <li><a href="{ADMINSCRIPT}?mod=$mod&op=list">未安装主题</a></li>
      <li class="pull-right">
              <a href="{ADMINSCRIPT}?mod=thame&op=edit">添加主题</a>
          </li>
    </ul>
  </div>
  <div class="main-content clearfix" style="padding:20px;border-top:1px solid #FFF"> 
    <!--{if $count}-->
    <ul id="colorContainer"  class="thumbnails list-unstyled">
      <!--{loop $thames $key $value}-->
      <li id="thame_$value[id]" class=" thame_block" >
        <div class="clearfix" style="position:relative;padding:10px 10px 0"> 
          <div class="delete" style="position:absolute;right:10px;top:10px;width:100px">
              <a href="javascript:;" onclick="deletethame('$value[id]');return false" title="删除"><i class="glyphicon glyphicon-trash ibtn"></i></a>
              <a href="{ADMINSCRIPT}?mod=$mod&op=edit&id=$value[id]" title="编辑"><i class="glyphicon glyphicon-edit ibtn"></i></a>
              <a href="{ADMINSCRIPT}?mod=$mod&op=cp&do=export&id=$value[id]" title="导出" target="_blank"><i class="glyphicon glyphicon-export ibtn"></i></a>
          </div>
          <p class="text-center" ><a href="{ADMINSCRIPT}?mod=$mod&op=edit&id=$value[id]"><img title="$value[title]" alt="$value[title]" class="img-thumbnail img_120_75" src="$value[thumb]"  /></a></p>
          <p class="text-center" style="margin:0"><a href="{ADMINSCRIPT}?mod=$mod&op=edit&id=$value[id]">$value[name]</a></p>
        </div>
      </li>
      <!--{/loop}-->
    </ul>
    <!--{if $multi}-->
    <div class="text-center clearfix">$multi</div>
    <!--{/if}--> 
    <!--{else}-->
    <div class="well well-small">还没有添加主题，<a href="{ADMINSCRIPT}?mod=$mod&op=edit">添加主题</a></div>
    <!--{/if}--> 
  </div>
  <script type="text/javascript">
                jQuery(document).ready(function(){
                    var el=jQuery('.thame_block');
                    el.on('mouseenter',function(){
                        jQuery(this).addClass('hover');
                    });
                    el.on('mouseleave',function(){
                        jQuery(this).removeClass('hover');
                    });
                });
				function deletethame(id){
					if(confirm('确定要删除此主题？')){
						jQuery.getJSON('{ADMINSCRIPT}?mod=thame&op=ajax&do=deletethame&id='+id,function(json){
							if(json.error){
								
							}else{
								jQuery('#thame_'+id).remove();
							}
						});
					}
				}
            </script> 

  
  <!--{elseif $operation=='color'}-->
  <div class="main-header clearfix" style="position:inherit;padding:5px;"> <span  style="line-height:30px;float:left">选择颜色添加&nbsp;&nbsp;</span>
    <div class="input-group pull-left" style="width:180px;padding-right:20px;">
      <input id="color_val" type="text" value="#000" class="form-control input-sm"  placeholder="点击右侧色块选择颜色">
      <a  class="input-group-addon" initialized="true" id="c1" onclick="c1_frame.location='static/image/tool/getcolor.htm?c1|color_val';showMenu({'ctrlid':'c1'})" style="background-color: #000;width:30px;"></a> </div>
    <button type="button"  class="btn btn-primary btn-sm pull-left"  onclick="addColor(this)" />
    添加
    </button>
    <span  style="line-height:30px;float:left"  id="return_color"></span> <span id="c1_menu" style="display: none">
    <iframe name="c1_frame" src="" frameborder="0" height="148" scrolling="no" width="210"></iframe>
    </span> </div>
  <div class="main-content clearfix" style="padding:15px;border-top:1px solid #FFF">
    <ul id="colorContainer" class="clearfix list-unstyled" >
      <!--{loop $list $key $value}-->
      <li id="color_$value[bid]" backimg="$value[val]" class="pull-left color_block" style="width:110px;height:110px;position:relative;padding:10px"> <a href="javascript:;" style="position:absolute;right:0px;top:0px;"  class="delete"   onclick="deletewallpaper('$value[bid]');return false" title="删除"><i class="glyphicon glyphicon-remove-sign"></i></a> 
        <!--  <button style="position:absolute;right:5px;top:5px;" type="button" class="delete pull-right"  aria-hidden="true" onclick="deletewallpaper('$value[bid]')" title="删除"></button>--> 
        <a class="img-thumbnail"  style="display:inline-block;width:90px;height:90px;background:$value[val]" title="$value[title]"></a> </li>
      <!--{/loop}-->
    </ul>
    <!--{if $multi}-->
    <div class="text-center clearfix" style="margin:10px">$multi</div>
    <!--{/if}--> 
    <!--{if !$count}-->
    <div class="well well-small">还没有设置偏好色，请点击头上颜色选择器选择颜色添加</div>
    <!--{/if}--> 
  </div>
  <script type="text/javascript">
      		jQuery(document).ready(function(){
				var el=jQuery('.color_block');
				el.on('mouseenter',function(){
					jQuery(this).addClass('hover');
				});
				el.on('mouseleave',function(){
					jQuery(this).removeClass('hover');
				});
				el.on('click',function(){
							jQuery('.color_block').removeClass('active1');
							jQuery(this).addClass('active1');
							 document.getElementById('color_val').value=jQuery(this).attr('backimg');
							 document.getElementById('c1').style.backgroundColor=jQuery(this).attr('backimg');
						});
			});
			var colorTimer=0;
			function addColor(obj){
				var color=jQuery('#color_val').val();
				jQuery.getJSON('{ADMINSCRIPT}?mod=thame&op=ajax&do=addcolor&val='+encodeURIComponent(color),function(json){
					if(json && json.bid>0){
						var el=jQuery('<li id="color_'+json.bid+'" class="pull-left color_block" style="width:110px;height:110px;position:relative;padding:10px"><a href="javascript:;" style="position:absolute;right:0px;top:0px;" class="delete" onclick="deletewallpaper(\''+json.bid+'\')" title="删除"><i class="glyphicon glyphicon-remove-sign"></i></a><a class="img-thumbnail"  style="display:inline-block;width:90px;height:90px;background:'+json.val+'"></a></li>')
						.on('mouseenter',function(){
							jQuery(this).addClass('hover');
						})
						.on('mouseleave',function(){
							jQuery(this).removeClass('hover');
							
						});
						if(jQuery('#colorContainer').children().length>0){
							jQuery('#colorContainer').children().first().before(el);
						}else{
							el.appendTo('#colorContainer');
						}
						jQuery('#return_color').html('<span class="text-success">添加成功</span>');
						jQuery('.well').remove();
					}else if(json && json.error){
						 jQuery('#return_color').html('<span class="text-danger">'+json.error+'</span>');
					}
					
					if(colorTimer) window.clearTimeout(colorTimer);
					colorTimer=window.setTimeout(function(){ jQuery('#return_color').html('')},3000);
				});
			}
			
		</script> 
  <!--{elseif $operation=='syscolor'}-->
  <div class="main-header clearfix" style="position:inherit;padding:5px;"> <span  style="line-height:30px;float:left">选择颜色添加&nbsp;&nbsp;</span>
    <div class="input-group pull-left" style="width:180px;padding-right:20px;">
      <input id="color_val" type="text" value="#000" class="form-control input-sm"  placeholder="点击右侧色块选择颜色">
      <a  class="input-group-addon" initialized="true" id="c1" onclick="c1_frame.location='static/image/tool/getcolor.htm?c1|color_val';showMenu({'ctrlid':'c1'})" style="background-color: #000;width:30px;"></a> </div>
    <button type="button"  class="btn btn-primary btn-sm pull-left"  onclick="addColor(this)" />
    添加
    </button>
    <span  style="line-height:30px;float:left"  id="return_color"></span> <span id="c1_menu" style="display: none">
    <iframe name="c1_frame" src="" frameborder="0" height="148" scrolling="no" width="210"></iframe>
    </span> </div>
  <div class="main-content clearfix" style="padding:15px;border-top:1px solid #FFF">
    <ul id="colorContainer" class="clearfix list-unstyled">
      <!--{loop $list $key $value}-->
      <li id="color_$value[bid]" backimg="$value[val]" class="pull-left color_block" style="width:110px;height:110px;position:relative;padding:10px"> <a href="javascript:;" style="position:absolute;right:0px;top:0px;"  class="delete"   onclick="deletewallpaper('$value[bid]');return false" title="删除"><i class="glyphicon glyphicon-remove-sign"></i></a> <a class="img-thumbnail"  style="display:inline-block;width:90px;height:90px;background:$value[val]" title="$value[title]"></a> </li>
      <!--{/loop}-->
    </ul>
    <!--{if $multi}-->
    <div class="text-center clearfix" style="margin:10px">$multi</div>
    <!--{/if}--> 
    <!--{if !$count}-->
    <div class="well well-small">还没有设置偏好色，请点击头上颜色选择器选择颜色添加</div>
    <!--{/if}--> 
  </div>
  <script type="text/javascript">
      		jQuery(document).ready(function(){
				var el=jQuery('.color_block');
				el.on('mouseenter',function(){
					jQuery(this).addClass('hover');
				});
				el.on('mouseleave',function(){
					jQuery(this).removeClass('hover');
				});
				el.bind('click',function(){
					jQuery('.color_block').removeClass('active1');
					jQuery(this).addClass('active1');
					 document.getElementById('color_val').value=jQuery(this).attr('backimg');
					 document.getElementById('c1').style.backgroundColor=jQuery(this).attr('backimg');
					
				});
			});
			var colorTimer=0;
			
			function addColor(){
				var color=jQuery('#color_val').val();
				
				jQuery.getJSON('{ADMINSCRIPT}?mod=thame&op=ajax&do=addsyscolor&val='+encodeURIComponent(color),function(json){
					if(json && json.bid>0){
						var el=jQuery('<li id="color_'+json.bid+'" class="pull-left color_block" style="width:110px;height:110px;position:relative;padding:10px"><a href="javascript:;" style="position:absolute;right:0px;top:0px;" class="delete" onclick="deletewallpaper(\''+json.bid+'\')" title="删除"><i class="glyphicon glyphicon-remove-sign"></i></a><a class="img-thumbnail"  style="display:inline-block;width:90px;height:90px;background:'+json.val+'"></a></li>')
						.on('mouseenter',function(){
							jQuery(this).addClass('hover');
						})
						.on('mouseleave',function(){
							jQuery(this).removeClass('hover');
							
						});
						if(jQuery('#colorContainer').children().length>0){
							jQuery('#colorContainer').children().first().before(el);
						}else{
							el.appendTo('#colorContainer');
						}
						jQuery('#return_color').html('<span class="text-success">添加成功</span>');
						jQuery('.well').remove();
					}else if(json && json.error){
						 jQuery('#return_color').html('<span class="text-danger">'+json.error+'</span>');
					}
					
					if(colorTimer) window.clearTimeout(colorTimer);
					colorTimer=window.setTimeout(function(){ jQuery('#return_color').html('')},3000);
				});
			}
		</script> 
  <!--{elseif $operation=='repeat'}-->
  <div class="main-header clearfix">
    <ul class="nav nav-pills nav-pills-bottomguide" >
      <li <!--{if !$do && !$classid}--> class="active"<!--{/if}-->><a href="{ADMINSCRIPT}?mod=$mod&operation=$operation">全部</a>
      </li>
      <!--{loop $class $value}--> 
      <li <!--{if $value[classid]==$classid}-->class="active"<!--{/if}-->><a href="{ADMINSCRIPT}?mod=$mod&operation=$operation&classid=$value[classid]">$value[classname]</a>
      </li>
      <!--{/loop}--> 
      <li <!--{if $do=='class'}--> class="active"<!--{/if}-->><a href="{ADMINSCRIPT}?mod=$mod&operation=repeat&do=class">分类管理</a>
      </li>
    </ul>
  </div>
  <!--{if $do=='class'}-->
  <div class="main-content clearfix" style="padding:0;border-top:1px solid #FFF">
    <form name="cpform" class="form-horizontal form-horizontal-left" method="post"  action="{ADMINSCRIPT}?mod=thame&operation=class" id="cpform" >
      <input type="hidden" name="formhash" value="{FORMHASH}">
      <input type="hidden" name="type" value="$operation">
      <ul id="classContainer" class="clearfix list-unstyled">
        <table class="table table-hover">
          <thead>
            <tr>
              <th width="40">&nbsp;</th>
              <th width="60p">排序</th>
              <th>分类名称</th>
            </tr>
          </thead>
          <tbody>
            <!--{loop $class $value}-->
            <tr>
              <td><input type="hidden" name="ids[{$value[classid]}]" value="$value[classid]">
                <input type="checkbox" name="del[]"  value="$value[classid]" style="width:40px;" /></td>
              <td><input type="text" class="form-control" value="$value[disp]" name="disp[{$value[classid]}]" class="form-control" style="width:45px"></td>
              <td><input value="$value[classname]" class="form-control" type="text" name="classname[{$value[classid]}]" class="input-lg"></td>
            </tr>
            <!--{/loop}-->
          </tbody>
          <thead>
            <tr>
              <td colspan="5">&nbsp;&nbsp;&nbsp;
                <input type="checkbox" name="chkall" id="chkall" class="checkbox-inline ml20" onclick="checkAll('prefix', this.form, 'del')" title="删">
                &nbsp;删?&nbsp;&nbsp;&nbsp;
                <input type="submit" class="btn btn-primary" value="提交" />
                &nbsp;&nbsp;&nbsp;
                <button class="btn btn-success" onclick="addClass();return false">添加新分类</button></td>
            </tr>
          </thead>
        </table>
      </ul>
    </form>
    <!--{if !$class}-->
    <div class="alert alert-warning">可以点击下面的添加分类按钮来添加分类</div>
    <!--{/if}--> 
  </div>
  <script type="text/javascript">
                function addClass(){
                    var html='<tr>';
                        html+='<td>&nbsp;</td>';
                        html+='<td><input type="text" value="0" name="newdisp[]" class="form-control" style="width:40px;" ></td>';
                        html+='<td><input value="" type="text" name="newclassname[]" class="form-control"></td>';
                        html+='</tr>';
                   // jQuery(html).appendTo('#classContainer');
					jQuery('#classContainer tbody').append(html);
                }
              </script> 
  <!--{else}-->
  <div class="main-content clearfix" style="padding:15px;border-top:1px solid #FFF">
    <div class="" style="border:1px solid #CCC;margin-bottom:10px;">
      <div style="line-height:30px;height:30px;padding:0 10px;font-size:16px;font-weight:bold;background:#F7F7F7;border-bottom:1px solid #CCC;margin-bottom:10px;">添加壁纸</div>
      <form name="cpform" class="form-horizontal form-horizontal-left" method="post"  action="{ADMINSCRIPT}?mod=thame&operation=repeat&do=add" id="cpform" enctype="multipart/form-data">
        <input type="hidden" name="formhash" value="{FORMHASH}">
        <input type="hidden" name="type" value="repeat">
        <div class="form-group">
          <label class="control-label" style="width:140px" for="classid">选择壁纸分类：</label>
          <select id="classid" name="classid" style="margin: 0px;" class="form-control">
            <option value="0">选择壁纸分类</option>
            <!--{loop $class $value}--> 
            <option value="$value[classid]" <!--{if $value[classid]==$classid}-->selected="selected"<!--{/if}-->>$value[classname]
            </option>
            <!--{/loop}-->
          </select>
        </div>
        <div class="form-group">
          <label class="control-label" style="width:140px" for="backimg">上传壁纸：</label>
          <input name="backimg" id="backimg" value="" type="file" class="form-control">
        </div>
        <div class="form-group">
          <label class="control-label" style="width:140px;"></label>
          <input class="btn btn-primary" id="submit_stylesubmit" name="stylesubmit" title="" value="上 传" type="submit">
        </div>
      </form>
    </div>
    <!--{if $count}-->
    <ul id="colorContainer" class="clearfix list-unstyled">
      <!--{loop $list $key $value}-->
      <li id="color_$value[bid]" class="pull-left color_block" style="padding:10px;width:110px;height:110px;position:relative"> <a href="javascript:;" style="position:absolute;right:0px;top:0px;"  class="delete"   onclick="deletewallpaper('$value[bid]');return false" title="删除"><i class="glyphicon glyphicon-remove-sign"></i></a> <a class="img-thumbnail" style="display:inline-block;width:90px;height:90px;background:url($value[val])" title="$value[title]"></a> </li>
      <!--{/loop}-->
    </ul>
    <!--{if $multi}-->
    <div class="text-center clearfix">$multi</div>
    <!--{/if}--> 
    <!--{else}-->
    <div class="well well-small">此分类没有壁纸</div>
    <!--{/if}--> 
  </div>
  <script type="text/javascript">
                jQuery(document).ready(function(){
                    var el=jQuery('.color_block');
                    el.on('mouseenter',function(){
                        jQuery(this).addClass('hover');
                    });
                    el.on('mouseleave',function(){
                        jQuery(this).removeClass('hover');
                    });
                });
            </script> 
  <!--{/if}--> 
  <!--{elseif $operation=='scale'}-->
  <div class="main-header clearfix">
    <ul class="nav nav-pills nav-pills-bottomguide">
      <li <!--{if !$do && !$classid}--> class="active"<!--{/if}-->><a href="{ADMINSCRIPT}?mod=$mod&operation=$operation">全部</a>
      </li>
      <!--{loop $class $value}--> 
      <li <!--{if $value[classid]==$classid}-->class="active"<!--{/if}-->><a href="{ADMINSCRIPT}?mod=$mod&operation=$operation&classid=$value[classid]">$value[classname]</a>
      </li>
      <!--{/loop}--> 
      <li <!--{if $do=='class'}--> class="active"<!--{/if}-->><a href="{ADMINSCRIPT}?mod=$mod&operation=scale&do=class">分类管理</a>
      </li>
    </ul>
  </div>
  <!--{if $do=='class'}-->
  <div class="main-content clearfix" style="padding:0;border-top:1px solid #FFF">
    <form name="cpform" class="form-horizontal form-horizontal-left" method="post"  action="{ADMINSCRIPT}?mod=thame&operation=class" id="cpform" >
      <input type="hidden" name="formhash" value="{FORMHASH}">
      <input type="hidden" name="type" value="$operation">
      <ul id="classContainer" class="clearfix list-unstyled">
        <table class="table table-hover">
          <thead>
            <tr>
              <th width="40">&nbsp;</th>
              <th width="60p">排序</th>
              <th>分类名称</th>
            </tr>
          </thead>
          <tbody>
            <!--{loop $class $value}-->
            <tr>
              <td><input type="hidden" name="ids[{$value[classid]}]" value="$value[classid]">
                <input type="checkbox" name="del[]"  value="$value[classid]" style="width:40px;" /></td>
              <td><input type="text" class="form-control" value="$value[disp]" name="disp[{$value[classid]}]" class="form-control" style="width:45px"></td>
              <td><input value="$value[classname]" class="form-control" type="text" name="classname[{$value[classid]}]" class="input-lg"></td>
            </tr>
            <!--{/loop}-->
          </tbody>
          <thead>
            <tr>
              <td colspan="5">&nbsp;&nbsp;&nbsp;
                <input type="checkbox" name="chkall" id="chkall" class="checkbox-inline ml20" onclick="checkAll('prefix', this.form, 'del')" title="删">
                &nbsp;删?&nbsp;&nbsp;&nbsp;
                <input type="submit" class="btn btn-primary" value="提交" />
                &nbsp;&nbsp;&nbsp;
                <button class="btn btn-success" onclick="addClass();return false">添加新分类</button></td>
            </tr>
          </thead>
        </table>
      </ul>
    </form>
    <!--{if !$class}-->
    <div class="alert alert-warning">可以点击下面的添加分类按钮来添加分类</div>
    <!--{/if}--> 
  </div>
  <script type="text/javascript">
		   function addClass(){
                    var html='<tr>';
                        html+='<td>&nbsp;</td>';
                        html+='<td><input type="text" value="0" name="newdisp[]" class="form-control" style="width:40px;" ></td>';
                        html+='<td><input value="" type="text" name="newclassname[]" class="form-control"></td>';
                        html+='</tr>';
                   // jQuery(html).appendTo('#classContainer');
					jQuery('#classContainer tbody').append(html);
                }
		  </script> 
  <!--{else}-->
  <div class="main-content clearfix" style="padding:10px;border-top:1px solid #FFF">
    <div class="" style="border:1px solid #CCC;margin-bottom:10px;">
      <div style="line-height:30px;height:30px;padding:0 10px;font-size:16px;font-weight:bold;background:#F7F7F7;border-bottom:1px solid #CCC;margin-bottom:10px;">添加壁纸</div>
      <form name="cpform" class="form-horizontal form-horizontal-left" method="post"  action="{ADMINSCRIPT}?mod=thame&operation=scale&do=add" id="cpform" enctype="multipart/form-data">
        <input type="hidden" name="formhash" value="{FORMHASH}">
        <input type="hidden" name="type" value="scale">
        <div class="form-group">
          <label class="control-label" style="width:140px" for="classid">选择壁纸分类：</label>
          <select id="classid" name="classid" style="margin: 0px;" class="form-control">
            <option value="0">选择壁纸分类</option>
            <!--{loop $class $value}--> 
            <option value="$value[classid]" <!--{if $value[classid]==$classid}-->selected="selected"<!--{/if}-->>$value[classname]
            </option>
            <!--{/loop}-->
          </select>
        </div>
        <div class="form-group">
          <label class="control-label" style="width:140px" for="backimg">上传壁纸：</label>
          <input name="backimg" id="backimg" value="" type="file" class="form-control">
        </div>
        <div class="form-group">
          <label class="control-label" style="width:140px;"></label>
          <input class="btn btn-primary" id="submit_stylesubmit" name="stylesubmit" title="" value="上 传" type="submit">
        </div>
      </form>
    </div>
    <!--{if $count}-->
    <ul id="colorContainer" class="clearfix list-unstyled">
      <!--{loop $list $key $value}-->
      <li id="color_$value[bid]" class="pull-left color_block text-center" style="padding:10px;width:130px;height:90px;position:relative"> <a href="javascript:;" style="position:absolute;right:0px;top:0px;"  class="delete"   onclick="deletewallpaper('$value[bid]');return false" title="删除"><i class="glyphicon glyphicon-remove-sign"></i></a> <a href="$value[val]" target="_blank"><img title="$value[title]" alt="$value[title]" class="img-thumbnail img_100_64" src="$value[thumbpic]"  /></a> </li>
      <!--{/loop}-->
    </ul>
    <!--{if $multi}-->
    <div class="text-center clearfix">$multi</div>
    <!--{/if}--> 
    <!--{else}-->
    <div class="well well-small">还没有壁纸</div>
    <!--{/if}--> 
    
  </div>
  <script type="text/javascript">
      		jQuery(document).ready(function(){
				var el=jQuery('.color_block');
				el.on('mouseenter',function(){
					jQuery(this).addClass('hover');
				});
				el.on('mouseleave',function(){
					jQuery(this).removeClass('hover');
				});
			});			
		</script> 
  <!--{/if}--> 
  <!--{elseif $operation=='url'}-->
  <div class="main-content clearfix" style="padding:10px;border-top:1px solid #FFF">
    <div style="border:1px solid #CCC;margin-bottom:10px;">
      <div style="line-height:30px;height:30px;padding:0 10px;font-size:16px;font-weight:bold;background:#F7F7F7;border-bottom:1px solid #CCC;margin-bottom:10px;">添加动态壁纸</div>
      <form name="cpform" class="form-horizontal form-horizontal-left" method="post"  action="{ADMINSCRIPT}?mod=thame&operation=url&do=add" id="cpform" enctype="multipart/form-data">
        <input type="hidden" name="formhash" value="{FORMHASH}">
        <input type="hidden" name="type" value="url">
        <div class="form-group">
          <label class="control-label" for="title">壁纸名称：</label>
          <input class="form-control" name="title" id="title" value="" type="text" style="height:auto">
          <span class="help-inline">可选，壁纸的名称</span> </div>
        <div class="form-group">
          <label class="control-label" for="val">壁纸地址：</label>
          <input class="form-control" name="val" id="val" value="" type="text" style="height:auto">
          <span class="help-inline">可以是相对于根目录的相对地址，或网络地址</span> </div>
        <div class="form-group">
          <label class="control-label" for="backimg">上传缩略图：</label>
          <input name="backimg" id="backimg" class="form-control" value="" type="file" class="file">
        </div>
        <div class="form-group">
          <label class="control-label"></label>
          <input class="btn btn-primary" id="submit_stylesubmit" name="stylesubmit" title="" value="上 传" type="submit">
        </div>
      </form>
    </div>
    <!--{if $count}-->
    <ul id="colorContainer" class="clearfix list-unstyled" >
      <!--{loop $list $key $value}-->
      <li id="color_$value[bid]" class="pull-left color_block text-center" style="padding:10px;width:130px;height:90px;position:relative"> <a href="javascript:;" style="position:absolute;right:0px;top:0px;"  class="delete"   onclick="deletewallpaper('$value[bid]');return false" title="删除"><i class="glyphicon glyphicon-remove-sign"></i></a> <a href="$value[val]" target="_blank"><img title="$value[title]" alt="$value[title]" class="img-thumbnail img_100_64" src="$value[thumbpic]"  /></a> </li>
      <!--{/loop}-->
    </ul>
    <!--{if $multi}-->
    <div class="text-center clearfix" style="margin:10px">$multi</div>
    <!--{/if}--> 
    <!--{else}-->
    <div class="well well-small">还没有壁纸</div>
    <!--{/if}--> 
  </div>
  <script type="text/javascript">
      		jQuery(document).ready(function(){
				var el=jQuery('.color_block');
				el.on('mouseenter',function(){
					jQuery(this).addClass('hover');
				});
				el.on('mouseleave',function(){
					jQuery(this).removeClass('hover');
				});
			});			
		</script> 
  
  <!--{/if}--> 
</div>
<script type="text/javascript">
jQuery('.left-drager').leftDrager_layout();
function deletewallpaper(bid){
	jQuery.getJSON('{ADMINSCRIPT}?mod=thame&op=ajax&do=delete&bid='+bid,function(json){
		if(json.error){
			jQuery('#return_color').html('<span class="text-danger">'+json.error+'</span>');
		}else{
			jQuery('#color_'+bid).remove();
			 jQuery('#return_color').html('<span class="text-success">删除成功！</span>');
		}
		try{
		if(colorTimer) window.clearTimeout(colorTimer);
		colorTimer=window.setTimeout(function(){jQuery('#return_color').html('')},3000);
		}catch(e){}
	});
}
</script> 
<!--{template common/footer_simple}--> 
